import java.io.File;
import java.io.IOException;
import java.util.*;

public class printer {
	public static void analysisZero() throws IOException {
		File file = new File("test.txt");
		Scanner scan = new Scanner(file);
		double count = 0, zero = 0;
		while(scan.hasNext()){
			String tmp = scan.nextLine();
			String[] s = tmp.split("\\s");
			if(s[1].equals("0.0"))	zero++;
			count++;
		}
		System.out.println("number of total tuples: "+ count);
		System.out.println("number of tuples with value 0: "+ zero);
		System.out.println(zero/count);
	}
	
	public static void main(String[] args) throws IOException{
		analysisZero();
	}
}
